<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>进程守护之supervisord | aps.net core 开发分享</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="linux下安装supervisorapt-get install supervisor安装完成后，配置supervisor守护实例在&#x2F;etc&#x2F;supervisor&#x2F;conf.d目录下新建[名称].conf,(.net core)并配置如下： 12345678910[program:名称]command&#x3D;&#x2F;usr&#x2F;bin&#x2F;dotnet &#x2F;目录&#x2F;xxx.dll">
<meta property="og:type" content="article">
<meta property="og:title" content="进程守护之supervisord">
<meta property="og:url" content="http://wert365.com/2022/02/12/%E8%BF%9B%E7%A8%8B%E5%AE%88%E6%8A%A4%E4%B9%8Bsupervisord/index.html">
<meta property="og:site_name" content="aps.net core 开发分享">
<meta property="og:description" content="linux下安装supervisorapt-get install supervisor安装完成后，配置supervisor守护实例在&#x2F;etc&#x2F;supervisor&#x2F;conf.d目录下新建[名称].conf,(.net core)并配置如下： 12345678910[program:名称]command&#x3D;&#x2F;usr&#x2F;bin&#x2F;dotnet &#x2F;目录&#x2F;xxx.dll">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2022-02-12T10:11:56.000Z">
<meta property="article:modified_time" content="2022-04-08T07:12:08.256Z">
<meta property="article:author" content="大 壮">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="aps.net core 开发分享" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/css/style.css">

  
    
<link rel="stylesheet" href="/fancybox/jquery.fancybox.min.css">

  
<meta name="generator" content="Hexo 6.1.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">aps.net core 开发分享</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS 订阅"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="搜索"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://wert365.com"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-进程守护之supervisord" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2022/02/12/%E8%BF%9B%E7%A8%8B%E5%AE%88%E6%8A%A4%E4%B9%8Bsupervisord/" class="article-date">
  <time class="dt-published" datetime="2022-02-12T10:11:56.000Z" itemprop="datePublished">2022-02-12</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      进程守护之supervisord
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h2 id="linux下安装supervisor"><a href="#linux下安装supervisor" class="headerlink" title="linux下安装supervisor"></a>linux下安装supervisor</h2><p>apt-get install supervisor<br>安装完成后，配置supervisor守护实例<br>在&#x2F;etc&#x2F;supervisor&#x2F;conf.d目录下新建[名称].conf,(.net core)并配置如下：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">[program:名称]</span><br><span class="line"><span class="built_in">command</span>=/usr/bin/dotnet /目录/xxx.dll                     <span class="comment">#dll绝对目录</span></span><br><span class="line">directory=/目录/                                          <span class="comment">#dll绝对目录</span></span><br><span class="line">autostart=<span class="literal">true</span></span><br><span class="line">autorestart=<span class="literal">true</span></span><br><span class="line">stderr_logfile=/var/log/[名称].err.log</span><br><span class="line">stdout_logfile=/var/log/[名称].out.log</span><br><span class="line">stopsignal=INT</span><br><span class="line">stopasgroup=<span class="literal">false</span></span><br><span class="line">killasgroup=<span class="literal">false</span></span><br></pre></td></tr></table></figure>
<h3 id="supervisorctl-日常管理命令"><a href="#supervisorctl-日常管理命令" class="headerlink" title="supervisorctl 日常管理命令"></a>supervisorctl 日常管理命令</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">supervisorctl status 名称                             <span class="comment">#查看状态</span></span><br><span class="line">supervisorctl stop 名称                               <span class="comment">#停止</span></span><br><span class="line">supervisorctl start 名称                              <span class="comment">#启动</span></span><br><span class="line">supervisorctl restart 名称                            <span class="comment">#重启</span></span><br></pre></td></tr></table></figure>
<p>注意: 配置时 替换文中[名称][目录]未实际名称和目录。</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://wert365.com/2022/02/12/%E8%BF%9B%E7%A8%8B%E5%AE%88%E6%8A%A4%E4%B9%8Bsupervisord/" data-id="cl1q3wv8h0003woi2at2a4orz" data-title="进程守护之supervisord" class="article-share-link">分享</a>
      
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2022/04/08/hello-world/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">前一篇</strong>
      <div class="article-nav-title">
        
          Hello World
        
      </div>
    </a>
  
  
    <a href="/2022/02/10/donet-core-dockerfile-%E5%AE%89%E8%A3%85gs/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">后一篇</strong>
      <div class="article-nav-title">donet core dockerfile 安装gs</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/04/">四月 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/02/">二月 2022</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2022/04/08/hello-world/">Hello World</a>
          </li>
        
          <li>
            <a href="/2022/02/12/%E8%BF%9B%E7%A8%8B%E5%AE%88%E6%8A%A4%E4%B9%8Bsupervisord/">进程守护之supervisord</a>
          </li>
        
          <li>
            <a href="/2022/02/10/donet-core-dockerfile-%E5%AE%89%E8%A3%85gs/">donet core dockerfile 安装gs</a>
          </li>
        
          <li>
            <a href="/2022/02/09/linux%E5%AE%89%E8%A3%85netcore%202-1/">linux安装netcore 2-1</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2022 大 壮<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/js/jquery-3.4.1.min.js"></script>



  
<script src="/fancybox/jquery.fancybox.min.js"></script>




<script src="/js/script.js"></script>





  </div>
</body>
</html>